<div class="btn-group">
    <button class="btn btn-sm btn-info logistics-modal" data-id="{{ $id }}" data-action="viewLogistics"><i class="fa fa-check"></i>&nbsp;物流信息</button>
    @if(\Encore\Admin\Facades\Admin::user()->can('fba.download'))
        <a href="/xqc/delivery/fba/{{ $id }}/download" target="_blank" style="margin-left: 5px;" class="btn btn-sm btn-default"><i class="fa fa-download"></i>&nbsp;下载</a>
    @endif
</div>
<div class="modal fade" id="logisticsModal" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <!-- 内容会加载到这里 -->
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script language="JavaScript" type="text/javascript">
    $(function () {
        $('.logistics-modal').on('click', function(e) {
            e.preventDefault();
            var id = $(this).data('id');
            var action = $(this).data('action');
            $("#logisticsModal").modal({
                remote : '/xqc/delivery/fba-modal?action=' + action + '&param=' + id
            });
        });
        $("#logisticsModal").on("hidden.bs.modal", function() {
            $(this).removeData("bs.modal");
            $(this).find(".modal-content").children().remove();
        });
    });
</script>
